home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
wfc007.000
/
include
/
cnetshar.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-08
|
2KB
|
81 lines
#if ! defined( NETWORK_SHARE_CLASS_HEADER )
/*
** Author: Samuel R. Blackburn
** CI$: 76300,326
** Internet: sammy@sed.csc.com
**
** You can use it any way you like.
*/
#define NETWORK_SHARE_CLASS_HEADER
class CNetworkShareInformation : public CObject
{
DECLARE_SERIAL( CNetworkShareInformation )
private:
void m_Initialize( void );
public:
CNetworkShareInformation();
CNetworkShareInformation( SHARE_INFO_2 *information_p );
virtual ~CNetworkShareInformation();
CString NetworkName;
DWORD Type;
CString Remark;
DWORD Permissions;
DWORD MaximumNumberOfUses;
DWORD CurrentNumberOfUses;
CString PathName;
CString Password;
virtual void Copy( SHARE_INFO_2 *source );
virtual void Empty( void );
virtual void Serialize( CArchive& archive );
};
class CNetworkShares : public CNetwork
{
DECLARE_SERIAL( CNetworkShares )
private:
void m_Initialize( void );
protected:
/*
** Connection information variables
*/
SHARE_INFO_2 *m_2InformationBuffer;
/*
** File Information enumeration variables
*/
DWORD m_2ResumeHandle;
DWORD m_2CurrentEntryNumber;
DWORD m_2NumberOfEntriesRead;
DWORD m_2TotalNumberOfEntries;
public:
CNetworkShares();
CNetworkShares( LPCTSTR machine_name );
virtual ~CNetworkShares();
virtual BOOL Add( CNetworkShareInformation& share_to_add );
virtual void Close( void );
virtual BOOL Delete( CNetworkShareInformation& share_to_delete );
virtual BOOL Enumerate( void );
virtual BOOL GetNext( CNetworkShareInformation& information );
virtual void Serialize( CArchive& archive );
};
#endif // NETWORK_SHARE_CLASS_HEADER